{% extends "base.html" %}

{% block page_title %}Your bookmarks ({{app_user.shortname}}){% endblock %}
{% block title %}Your bookmarks ({{app_user.shortname}}){% endblock %}
	
{% block content %}
	<div id="add_form">
		<form action="/add_bookmark" method="POST">
			{% for message in messages %}
				<b>{{message}}</b>
			{% endfor %}
			<table>
				<tr><td>Name</td><td><input class="full" name="name" type="text" /></td>
				<tr><td>URL</td><td><input class="full" name="url" type="text" value="http://" /></td>
				<tr><td colspan="2"><input class="full" type="submit" value="Add/edit bookmark" /></td></tr>
			</table>
		</form>
	</div>

	{% if bookmarks %}
	<ul>
		{% for bookmark in bookmarks %}
			<li class="bookmark"><a href="{{bookmark.url}}">{{bookmark.name}}</a> - <a href="/delete_bookmark?name={{bookmark.name}}">[delete]</a></li>
		{% endfor %}
	</ul>
	{% else %}
		<h3>You have no bookmarks</h3>
	{% endif %}

{% endblock %}